package com.huimingpay.transaction.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * 说明了应用选择了平台中的哪些支付渠道
 * @TableName app_platform_channel
 */
@TableName(value ="app_platform_channel")
public class AppPlatformChannel implements Serializable {
    /**
     * 
     */
    @TableId
    private Long id;

    /**
     * 应用id
     */
    private String appId;

    /**
     * 平台支付渠道
     */
    private String platformChannel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 应用id
     */
    public String getAppId() {
        return appId;
    }

    /**
     * 应用id
     */
    public void setAppId(String appId) {
        this.appId = appId;
    }

    /**
     * 平台支付渠道
     */
    public  String getPlatformChannel() {
        return platformChannel;
    }

    /**
     * 平台支付渠道
     */
    public void setPlatformChannel(String platformChannel) {
        this.platformChannel = platformChannel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AppPlatformChannel other = (AppPlatformChannel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getPlatformChannel() == null ? other.getPlatformChannel() == null : this.getPlatformChannel().equals(other.getPlatformChannel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getPlatformChannel() == null) ? 0 : getPlatformChannel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", appId=").append(appId);
        sb.append(", platformChannel=").append(platformChannel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}